Skip to main content

RavenDbUserAuthRepository<TUserAuth, TUserAuthDetails>

Assembly: ServiceStack.Authentication.RavenDb.dll
View Source
Declaration
public class RavenDbUserAuthRepository<TUserAuth, TUserAuthDetails> : IUserAuthRepositoryAsync, IAuthRepositoryAsync, IQueryUserAuthAsync, IManageApiKeysAsync, IUserAuthRepository, IAuthRepository, IQueryUserAuth, ICustomUserAuth, IManageApiKeys where TUserAuth : class, IUserAuth where TUserAuthDetails : class, IUserAuthDetails

Properties

IsInitialized

View Source
Declaration
public static bool IsInitialized { get; }

UserAuthIdentifier

View Source
Declaration
public string UserAuthIdentifier { get; set; }

UserAuthDetailsIdentifier

View Source
Declaration
public string UserAuthDetailsIdentifier { get; set; }

Methods

CreateOrUpdateUserAuthIndexAsync(IDocumentStore, CancellationToken)

View Source
Declaration
public static async Task CreateOrUpdateUserAuthIndexAsync(IDocumentStore store, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
IDocumentStorestore
System.Threading.CancellationTokentoken

CreateUserAuthAsync(IUserAuth, String, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> CreateUserAuthAsync(IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword
System.Threading.CancellationTokentoken

DeleteUserAuthAsync(String, CancellationToken)

View Source
Declaration
public async Task DeleteUserAuthAsync(string ravenUserAuthId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.StringravenUserAuthId
System.Threading.CancellationTokentoken

GetUserAuthAsync(String, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> GetUserAuthAsync(string ravenUserAuthId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringravenUserAuthId
System.Threading.CancellationTokentoken

UpdateUserAuthAsync(IUserAuth, IUserAuth, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser
System.Threading.CancellationTokentoken

UpdateUserAuthAsync(IUserAuth, IUserAuth, String, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword
System.Threading.CancellationTokentoken

CreateOrMergeAuthSessionAsync(IAuthSession, IAuthTokens, CancellationToken)

View Source
Declaration
public async Task<IUserAuthDetails> CreateOrMergeAuthSessionAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuthDetails>

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens
System.Threading.CancellationTokentoken

GetUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> GetUserAuthAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens
System.Threading.CancellationTokentoken

GetUserAuthByUserNameAsync(String, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> GetUserAuthByUserNameAsync(string userNameOrEmail, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringuserNameOrEmail
System.Threading.CancellationTokentoken

GetUserAuthDetailsAsync(String, CancellationToken)

View Source
Declaration
public async Task<List<IUserAuthDetails>> GetUserAuthDetailsAsync(string ravenUserAuthId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>>

Parameters
TypeName
System.StringravenUserAuthId
System.Threading.CancellationTokentoken

LoadUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)

View Source
Declaration
public async Task LoadUserAuthAsync(IAuthSession session, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Threading.CancellationTokentoken

SaveUserAuthAsync(IAuthSession, CancellationToken)

View Source
Declaration
public async Task SaveUserAuthAsync(IAuthSession authSession, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
System.Threading.CancellationTokentoken

SaveUserAuthAsync(IUserAuth, CancellationToken)

View Source
Declaration
public async Task SaveUserAuthAsync(IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IUserAuthuserAuth
System.Threading.CancellationTokentoken

TryAuthenticateAsync(String, String, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> TryAuthenticateAsync(string userName, string password, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringuserName
System.Stringpassword
System.Threading.CancellationTokentoken

TryAuthenticateAsync(Dictionary<String, String>, String, Int32, String, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> TryAuthenticateAsync(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.Collections.Generic.Dictionary<System.String,System.String>digestHeaders
System.StringprivateKey
System.Int32nonceTimeOut
System.Stringsequence
System.Threading.CancellationTokentoken

GetUserAuthsAsync(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

View Source
Declaration
public async Task<List<IUserAuth>> GetUserAuthsAsync(string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>

Parameters
TypeName
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take
System.Threading.CancellationTokentoken

SearchUserAuthsAsync(String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

View Source
Declaration
public async Task<List<IUserAuth>> SearchUserAuthsAsync(string query, string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>

Parameters
TypeName
System.Stringquery
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take
System.Threading.CancellationTokentoken

ApiKeyExistsAsync(String, CancellationToken)

View Source
Declaration
public async Task<bool> ApiKeyExistsAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.StringapiKey
System.Threading.CancellationTokentoken

GetApiKeyAsync(String, CancellationToken)

View Source
Declaration
public async Task<ApiKey> GetApiKeyAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.ApiKey>

Parameters
TypeName
System.StringapiKey
System.Threading.CancellationTokentoken

GetUserApiKeysAsync(String, CancellationToken)

View Source
Declaration
public async Task<List<ApiKey>> GetUserApiKeysAsync(string userId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.ApiKey>>

Parameters
TypeName
System.StringuserId
System.Threading.CancellationTokentoken

StoreAllAsync(IEnumerable<ApiKey>, CancellationToken)

View Source
Declaration
public async Task StoreAllAsync(IEnumerable<ApiKey> apiKeys, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey>apiKeys
System.Threading.CancellationTokentoken

CreateOrUpdateUserAuthIndex(IDocumentStore)

View Source
Declaration
public static void CreateOrUpdateUserAuthIndex(IDocumentStore store)
Parameters
TypeName
IDocumentStorestore

CreateUserAuth(IUserAuth, String)

View Source
Declaration
public IUserAuth CreateUserAuth(IUserAuth newUser, string password)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword

DeleteUserAuth(String)

View Source
Declaration
public void DeleteUserAuth(string ravenUserAuthId)
Parameters
TypeName
System.StringravenUserAuthId

GetUserAuth(String)

View Source
Declaration
public IUserAuth GetUserAuth(string ravenUserAuthId)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
System.StringravenUserAuthId

UpdateUserAuth(IUserAuth, IUserAuth)

View Source
Declaration
public IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser

UpdateUserAuth(IUserAuth, IUserAuth, String)

View Source
Declaration
public IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser, string password)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword

CreateOrMergeAuthSession(IAuthSession, IAuthTokens)

View Source
Declaration
public IUserAuthDetails CreateOrMergeAuthSession(IAuthSession authSession, IAuthTokens tokens)
Returns

ServiceStack.Auth.IUserAuthDetails

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens

GetUserAuth(IAuthSession, IAuthTokens)

View Source
Declaration
public IUserAuth GetUserAuth(IAuthSession authSession, IAuthTokens tokens)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens

GetUserAuthByUserName(String)

View Source
Declaration
public IUserAuth GetUserAuthByUserName(string userNameOrEmail)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
System.StringuserNameOrEmail

GetUserAuthDetails(String)

View Source
Declaration
public List<IUserAuthDetails> GetUserAuthDetails(string ravenUserAuthId)
Returns

System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>

Parameters
TypeName
System.StringravenUserAuthId

LoadUserAuth(IAuthSession, IAuthTokens)

View Source
Declaration
public void LoadUserAuth(IAuthSession session, IAuthTokens tokens)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens

SaveUserAuth(IAuthSession)

View Source
Declaration
public void SaveUserAuth(IAuthSession authSession)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession

SaveUserAuth(IUserAuth)

View Source
Declaration
public void SaveUserAuth(IUserAuth userAuth)
Parameters
TypeName
ServiceStack.Auth.IUserAuthuserAuth

TryAuthenticate(String, String, out IUserAuth)

View Source
Declaration
public bool TryAuthenticate(string userName, string password, out IUserAuth userAuth)
Returns

System.Boolean

Parameters
TypeName
System.StringuserName
System.Stringpassword
ServiceStack.Auth.IUserAuthuserAuth

TryAuthenticate(Dictionary<String, String>, String, Int32, String, out IUserAuth)

View Source
Declaration
public bool TryAuthenticate(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, out IUserAuth userAuth)
Returns

System.Boolean

Parameters
TypeName
System.Collections.Generic.Dictionary<System.String,System.String>digestHeaders
System.StringprivateKey
System.Int32nonceTimeOut
System.Stringsequence
ServiceStack.Auth.IUserAuthuserAuth

GetUserAuths(String, Nullable<Int32>, Nullable<Int32>)

View Source
Declaration
public List<IUserAuth> GetUserAuths(string orderBy = null, int? skip = null, int? take = null)
Returns

System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take

SearchUserAuths(String, String, Nullable<Int32>, Nullable<Int32>)

View Source
Declaration
public List<IUserAuth> SearchUserAuths(string query, string orderBy = null, int? skip = null, int? take = null)
Returns

System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.Stringquery
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take

ICustomUserAuth.CreateUserAuth()

View Source
Declaration
IUserAuth ICustomUserAuth.CreateUserAuth()
Returns

ServiceStack.Auth.IUserAuth

ICustomUserAuth.CreateUserAuthDetails()

View Source
Declaration
IUserAuthDetails ICustomUserAuth.CreateUserAuthDetails()
Returns

ServiceStack.Auth.IUserAuthDetails

ApiKeyExists(String)

View Source
Declaration
public bool ApiKeyExists(string apiKey)
Returns

System.Boolean

Parameters
TypeName
System.StringapiKey

GetApiKey(String)

View Source
Declaration
public ApiKey GetApiKey(string apiKey)
Returns

ServiceStack.Auth.ApiKey

Parameters
TypeName
System.StringapiKey

GetUserApiKeys(String)

View Source
Declaration
public List<ApiKey> GetUserApiKeys(string userId)
Returns

System.Collections.Generic.List<ServiceStack.Auth.ApiKey>

Parameters
TypeName
System.StringuserId

InitApiKeySchema()

View Source
Declaration
public void InitApiKeySchema()

StoreAll(IEnumerable<ApiKey>)

View Source
Declaration
public void StoreAll(IEnumerable<ApiKey> apiKeys)
Parameters
TypeName
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey>apiKeys

Implements